package ex401;

import ex401.shape.Component;
import ex401.util.Components;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Properties;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Properties properties = Components.loadComponentType();
        List<Component> list = Components.loadComponents(new Scanner(System.in));
        System.out.printf("%.2f\n", Components.totalArea(list));
    }
}
